USE [DMP]
GO

/****** Object:  StoredProcedure [dbo].[FILL_1_1_1]    Script Date: 05/02/2010 13:31:46 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[FILL_1_1_1] (@JOBID int) AS
SELECT VALUE_STRING FROM WEBAPP_CONST WHERE ALGORITHM_ID = 1 AND STEP_ID = 1
GO

/****** Object:  StoredProcedure [dbo].[WEBAPP_READ]    Script Date: 05/02/2010 13:31:47 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[WEBAPP_READ] (@DATANAME varchar(50)) AS 

SELECT ROW_ID, COLUMN_ID, VALUE FROM ALGORITHM_DATASTORE WHERE DATA_NAME = @DATANAME
GO

/****** Object:  StoredProcedure [dbo].[WEBAPP_WRITE]    Script Date: 05/02/2010 13:31:47 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[WEBAPP_WRITE] (@DATA_NAME varchar(50), @ROW_ID int, @COLUMN_ID int, @VALUE varchar(50)) AS 

INSERT INTO ALGORITHM_DATASTORE(DATA_NAME, ROW_ID, COLUMN_ID, VALUE)
VALUES
(@DATA_NAME, @ROW_ID, @COLUMN_ID, @VALUE)

GO

/****** Object:  StoredProcedure [dbo].[WRITE_1_1_2]    Script Date: 05/02/2010 13:31:47 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


-- Naming convention:
-- WRITE_ALGORITHMID_STEPID_CONTROLID

CREATE PROCEDURE [dbo].[WRITE_1_1_2] (@JOBID int, @STEPID int, @DATA_NAME varchar(50), @ROW_ID int, @COLUMN_ID int, @VALUE varchar(50)) AS
INSERT INTO ALGORITHM_DATASTORE VALUES (@JOBID, @STEPID, @DATA_NAME, @ROW_ID, @COLUMN_ID, @VALUE)
GO

